<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>站内搜索_<%=zych_home%></title>
<meta name="keywords" content="<%=zych_keywords%>" />
<meta name="description" content="<%=zych_description%>" />
<link href="<%=zych_templatedir%>css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=dir%>js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=zych_templatedir%>js/menu.js"></script>
<script type="text/javascript" src="<%=zych_templatedir%>js/superslide.2.1.js"></script>
<script type="text/javascript" src="<%=zych_templatedir%>js/MagicZoom.js"></script>
</head>
<body>
<!--#include file="top.asp"-->
<div id="mainpd">
<div class="Search" <%if key="" then %>style="margin-top:150px; margin-bottom:85px; height:360px;"<% End If %>>
<div class="sbox">
<form action="?" method="get" name="add">
<div class="sbtxt"></div><input name="key" type="text" value="<%=key%>" placeholder="请输入关键词..." class="key"><button type="submit" value="搜索一下" class="s_btn">搜索一下</button>
</form>
</div>
<% if key<>"" or topSortID<>"" then %>
<div class="snav">
<ul>
<%
topSort="Sort"&topSortID
Set rst= Server.CreateObject("ADODB.Recordset")
menu="select * from [zych_Type] where isok=1 and menu=1 and ParentID=0 and SortType<>1 order by px_id asc"'选择分类
rst.Open menu,Conn,1,1
if rst.bof and rst.eof then 
	echo"栏目正在建设中"
else
rst.movefirst
If topSort="" Then no=" class='on'" else no=""
	echo"<li"&no&"><a href='?key="&key&"'>全 部</a></li>"&vbcrlf
do while not rst.eof
If topSort="Sort"&rst("topSortID") Then no=" class='on'" else no=""
	echo"<li"&no&"><a href='?topSortID="&rst("SortID")&"&key="&key&"'>"&rst("SortName")&"</a></li>"&vbcrlf
rst.MoveNext
Loop
end if
rst.close
set rst=nothing%>
</ul>

</div>
<% End If %>
</div>
<% if key<>"" or topSortID<>"" then %>
<div class="list">
<%
if topSortID<>"" then tops="and topSortID="&topSortID&""
set rs=server.createobject("adodb.recordset") 
exec="select * from content where isok=1 and (title like '%"&key&"%' or PageKeywords like '%"&key&"%') "&tops&" and addtime<#"&now()&"# order by IsTop desc,px_id desc,Cid desc"
rs.open exec,conn,1,1 
if rs.eof and rs.bof then
response.Write("<div style=""line-height:400%; text-indent:20px;"">此分类信息正在添加中...</div>")
else
rs.PageSize =10 
iCount=rs.RecordCount 
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
For i=1 To x
if rs("img")<>"" then typeimg=""&rs("img") else typeimg="/images/nopic.gif"
sotitle=Replace(rs("title"),key,"<em>"&key&"</em>")%>
<div class="so_list">
<h2><a href="<%=zych_show_url(rs("SortID"),rs("Cid"))%>"><%=sotitle%></a></h2>
<dd><a href="<%=zych_show_url(rs("SortID"),rs("Cid"))%>" class="img"><img src="<%=typeimg%>" alt="<%=rs("title")%>" width="130" height="80"  onerror="this.src='/images/nologo.jpg'"/></a>
<div><p><%=stvalue(DelHtml(rs("Content")),150)%></p><p><span class="a"><%=zych_url&zych_show_url(rs("SortID"),rs("Cid"))%></span> <span class="b"><%=zychclass_name(rs("SortID"),SortType)%></span> <span class="b"><%=formatDate(rs("addtime"),1)%></span> </p>
</div></dd>
</div>
<%rs.movenext
next
end if%>
</div>
<%'以下显示分页 
echo PageControl(iCount,maxpage,page)
rs.close
set rs=nothing%>
<% End If %>
</div>
<!--#include file="bottom.asp"-->
</body>
</html>
